Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");  
  
function myComponent() {
	this.wrappedJSObject = this;  
	prefs = Components.classes["@mozilla.org/preferences-service;1"]
		.getService(Components.interfaces.nsIPrefService)
		.getBranch("extensions.firedrop.");
	prefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
	prefs.addObserver("", this, false);
}  
myComponent.prototype = {  
  // this must match whatever is in chrome.manifest!  
  classID: Components.ID("{e6b866e3-41b2-4f05-a4d2-3d4bde0f7ef8}"),  
  
  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIMyComponent]),  
  
	hello: function() { 
		return "Hello World!"; 
	}, 

	setPrefForKey: function(key, pref) { 
		prefs.setCharPref(key,pref);
		return; 
	},
	
	getPrefForKey: function(key) { 
		return prefs.getCharPref(key);
	}

		// this.prefs.setCharPref("accessecret","");
		// 	this.prefs.setCharPref("accesstoken","");

};  
  
// The following line is what XPCOM uses to create components. Each component prototype  
// must have a .classID which is used to create it.  
const NSGetFactory = XPCOMUtils.generateNSGetFactory([myComponent]);